home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / FFT / FFTR2A.HLP < prev    next >
Text File  |  1990-01-17  |  3KB  |  49 lines

  1.          Name: FFTR2A.ASM
  2.          Type: Assembler Macro
  3.       Version: 1.1
  4.   Last Change:  2-Oct-86
  5.  
  6.   Description: Radix 2, In-place, Decimation-in-time Complex FFT Macro
  7.  
  8.  This macro performs a complete Fast Fourier Transform (FFT) on complex
  9.  data.  The basic algorithm is the Decimation-in-time (DIT), Radix 2
  10.  FFT algorithm using 24 bit fixed-point arithmetic.  The algorithm uses
  11.  a sine-cosine lookup table for the FFT coefficients (twiddle factors).
  12.  The macro can be called to perform any FFT from 2-32768 points.  Simply
  13.  call it with the arguments of number of FFT points, location of the
  14.  data array and location of the sine-cosine table.  All register
  15.  initialization is performed by this macro.  However, the macro assumes
  16.  that registers which should not be altered by the FFT have already been
  17.  saved by the main program.  This allows the user to fit the FFT macro
  18.  into his application and thus control the context switching overhead.
  19.  No data scaling is performed and no overflow detection is done.
  20.  Modifications to this routine could allow it to be used with the
  21.  scaling modes and thus allow dynamic scaling for each FFT pass.
  22.  
  23.  All data and coefficients are complex, with the real part in X Data
  24.  memory and the imaginary part in Y Data memory.  For an N point FFT,
  25.  the data buffer requires N X Data and N Y Data memory locations.
  26.  The algorithm is performed "in-place", meaning that only one data
  27.  buffer is required for both input and output data.  The input
  28.  data is assumed to be in normal (time-sequential) order and the
  29.  output is in bit-reversed order.  By using the reverse-carry
  30.  address modifier and a separate output data buffer, the output
  31.  data may be easily unscrambled.  Other methods also exist to
  32.  unscramble the output data without a separate output data buffer. 
  33.  The FFTR2A macro uses "twiddle factors" (-cosine and -sine tables)
  34.  stored in data memory.  For maximum speed, the FFT macro performs
  35.  a lookup table operation to get new sine and cosine values for
  36.  each group of butterflies.  A SINCOS macro is available to
  37.  generate these tables.  For an N point FFT, N/2 X Data and N/2
  38.  Y Data locations are required.  Sine and cosine values could be
  39.  calculated in real-time to save data memory at the expense of
  40.  execution time.
  41.  
  42.  The FFTR2A macro requires about 40 words of program memory for any
  43.  size FFT from 2-32768 points.  This is the most compact FFT routine
  44.  available for the DSP56000.  Additional details are included in the
  45.  source file; however, more algorithm description would be required
  46.  for complete understanding by typical users.  A test program
  47.  FFTR2AT is included in the library to demonstrate the FFTR2A
  48.  calling procedure.
  49.